<!DOCTYPE HTML>
<html>
<head>
    <include file="Public/head" />
<title>{$current['title']}-{$Think.CONFIG.title}</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 原料管理 <span class="c-gray en">&gt;</span> 原料入库 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
	<div class="cl pd-5 bg-1 bk-gray"> 
	<div class="text-c"> 		
		<form class="formleft" name="" id="" action="{:U('inbound')}" method="post">
			<span class="select-box" style="width:150px">
				<select class="select" id="selval" name="selval">
					<option value="1">商品编码</option>	
					<option value="2">商品名称</option>	
				</select>
			</span>
			<input class="input-text" style="width:200px" type="text" value="" placeholder="关键字" name="keyword" id="article-class-val">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>	  
		</form>
		<div class="pages pageright">{$page}</div>
	</div>
	 </div>
	<table class="table table-border table-bordered table-hover table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="7">商品列表</th>
			</tr>
			<tr class="text-c">
				<th width="40"></th>
				<th width="40">生产计划单号</th>
				<th width="40">料号</th>
				<th width="40">商品编码</th>
				<th width="40">商品名称</th>
				<th width="40">数量</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c">
				<td>
				
					<if condition="$vo['pro_num'] eq 0">
						<input class="btn radius" type="button" style="background:#e0e0e0;" value="没有数量不能入库">
					<else />
						<if condition="$vo['inbound_status'] eq 1">
							<input class="btn radius" type="button" style="background:#e0e0e0;" onclick="admin_open('商品入库','{:U('goodsdetail',array('id'=>$vo['id'],'view'=>'1'))}','','800','600')"  value="已入库">
						<else />
							<input class="btn btn-success radius" onclick="admin_open('商品入库','{:U('goodsdetail',array('id'=>$vo['id']))}','','800','600')" type="button" value="入库">
						</if>
					</if>

				</td>
				<td>{$vo.purchasing_no}</td>
				<td>{$vo.source_no}</td>
				<td>{$vo.pro_no}</td>
				<td>{$vo.pro_name}</td>
				<td>{$vo['pro_num']}</td>
	
			</tr>
			</volist>
		</tbody>
		
	</table>
<div class="pages mt" style="text-align:right">{$page}</div>
</div>

<script type="text/javascript">
    $(function(){
		/*商品下架*/
        $(".ungrounding").click(function(){
			var goods_id=$(this).attr('attr_id');
            //询问
			
			layer.confirm('是否确定下架此商品', {
			  btn: ['是','否'] 
			}, function(){
				$.ajax({
					type: 'POST',
					data: {goods_id:goods_id},
					url: "{:U('ungrounding')}",
					success:function(data){
						layer.alert(data.info,function(){
							location.reload();
						});
						
					}
				})
			});
        });

    })
</script>
</body>
</html>